{% extends 'base.html' %}

{% block content %}
<h4>违纪申诉列表</h4>
<a href="{% url 'core:discipline_appeal_create' %}" class="btn btn-primary mb-3">新增申诉</a>
<table class="table table-striped">
    <thead>
        <tr>
            <th>学生</th>
            <th>申诉状态</th>
            <th>申诉日期</th>
            <th>操作</th>
        </tr>
    </thead>
    <tbody>
        {% for appeal in discipline_appeals %}
        <tr>
            <td>{{ appeal.record.student.name }}</td>
            <td>{{ appeal.get_appeal_status_display }}</td>
            <td>{{ appeal.appeal_date|date:'Y-m-d H:i' }}</td>
            <td>
                <a href="{% url 'core:discipline_appeal_update' appeal.pk %}" class="btn btn-sm btn-warning">编辑</a>
                <a href="{% url 'core:discipline_appeal_delete' appeal.pk %}" class="btn btn-sm btn-danger">删除</a>
            </td>
        </tr>
        {% empty %}
        <tr><td colspan="4">暂无违纪申诉记录</td></tr>
        {% endfor %}
    </tbody>
</table>
{% endblock %}